#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <limits.h>
#include <ctype.h>

#include <stdbool.h>

int
camelcase(const char *words, const int n, char * const buf)
{
	int i = 0;
	char *write_ptr;
	const char *read_ptr;
	bool first_c = true, first_w = true;

	write_ptr = buf;
	read_ptr  = words;
	while (i < n) {
		first_c = true;

		while (*read_ptr) {
			if (isalpha(*read_ptr)) {
				if (first_c && !first_w) {
					*write_ptr = toupper(*read_ptr);
					first_c = false;
				} else {
					*write_ptr = tolower(*read_ptr);
					first_w = false;
					first_c = false;
				}
			} else if (isdigit(*read_ptr)) {
				*write_ptr = *read_ptr;
			}

			read_ptr++;
			write_ptr++;
		}

		i++;
		read_ptr++;
	}

	return 0;
}

int
main(int argc, char **argv)
{
	static char buf[100 * 100 + 1 + 1];
	static char words[100 * 101];
	char *ptr = NULL;
	int i = 0;

	ptr = words;
	while (scanf("%s", ptr) == 1) {
		++i;
		ptr += strlen(ptr) + 1;
	}

	camelcase(words, i, buf);

	fputs(buf, stdout);
	fputc('\n', stdout);

	return 0;
}
